package com.lanqiao.dao.impl;

import com.lanqiao.dao.OrderDao;
import com.lanqiao.entity.OrderInfo;
import com.lanqiao.util.ORMUtil;

import java.util.List;

public class OrderImpl implements OrderDao {


    @Override
    public List<OrderInfo> selectOrder() {
        String sql="SELECT t1.order_id,t1.user_id,t1.address,t1.person,t1.phone,t1.order_price,t1.order_date,t2.`status`,t2.status_pay,t2.status_send,t2.status_receive FROM tb_order t1 INNER JOIN tb_order_log t2\n" +
                "on t1.order_id=t2.order_id";
        List<OrderInfo> list = new ORMUtil().selectList(OrderInfo.class, sql);
        return list;
    }
}
